# -*- coding:utf-8 -*-
from fastapi import APIRouter, Security
from app.aspect import global_filter
from app.controller.system import post_router, user_router, role_router, org_router, auth_router, menu_router, dict_router, param_router, attach_router, log_router, client_router

from app.test.controller import gencode

api_router = APIRouter(prefix="/api", dependencies=[Security(global_filter, scopes=[])])

# 代码生成接口
api_router.include_router(gencode.router,  prefix="/gen",  tags=["代码生成"])

# 系统管理
api_router.include_router(auth_router,  prefix="/sys/auth",  tags=["权限管理"])
api_router.include_router(user_router,  prefix="/sys/user",  tags=["用户管理"])
api_router.include_router(post_router,  prefix="/sys/post",  tags=["职位管理"])
api_router.include_router(role_router,  prefix="/sys/role",  tags=["角色管理"])
api_router.include_router(org_router,   prefix="/sys/org",  tags=["机构管理"])
api_router.include_router(menu_router,  prefix="/sys/menu",  tags=["菜单管理"])
api_router.include_router(dict_router,  prefix="/sys/dict",  tags=["字典管理"])
api_router.include_router(param_router,  prefix="/sys/param",  tags=["参数管理"])
api_router.include_router(attach_router,  prefix="/sys/attach",  tags=["附件管理"])
api_router.include_router(log_router,  prefix="/sys/log",  tags=["日志管理"])
api_router.include_router(client_router,  prefix="/sys/client",  tags=["应用管理"])

